/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/',
    component: () => import('@/views/layouts/index'),
    redirect: '/chat',
    meta: {
      title: '首页',
      keepAlive: false
    },
    children: [
      {
        path: '/chat',
        name: 'Chat',
        component: () => import('@/views/chat'),
        meta: { keepAlive: true },
        children: [
          {
            path: '/chat',
            name: 'ChatList',
            component: () => import('@/views/chat/ChatList'),
            meta: { title: '对话', showBack: false, keepAlive: true }
          },
          {
            path: '/chat/:id',
            name: 'ChatInfo',
            component: () => import('@/views/chat/Chat'),
            meta: { tabBar: false }
          }
        ]
      },
      {
        path: '/contact',
        name: 'Contact',
        component: () => import('@/views/contact'),
        children: [
          {
            path: '/contact',
            name: 'ContactList',
            component: () => import('@/views/contact/ContactList'),
            meta: { title: '通讯录', keepAlive: true }
          },
          {
            path: '/contact/:id',
            name: 'ContactInfo',
            component: () => import('@/views/contact/ContactInfo'),
            meta: { showBack: true, tabBar: false, keepAlive: true }
          }
        ]
      },
      {
        path: '/about',
        name: 'About',
        component: () => import('@/views/About'),
        meta: { title: '关于我', keepAlive: true }
      },
      {
        path: '/home',
        name: 'Home',
        component: () => import('@/views/home/index'),
        meta: { title: '首页', tabBar: false }
      }
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/Login'),
    name: 'Login',
    meta: {
      title: '登录',
      keepAlive: false
    }
  },
  {
    path: '/registry',
    component: () => import('@/views/Registry'),
    name: 'Registry',
    meta: {
      title: '注册',
      keepAlive: false
    }
  }
]
